import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
import { transformerTime } from "../../base/entity/base";

@Entity('tenant_info', { comment: '租户信息' })
export class TenantInfoEntity {

    @PrimaryGeneratedColumn('increment', {
        comment: '租户ID',
    })
    id: number

    @Index()
    @Column({
        comment: '创建时间',
        type: 'varchar',
        transformer: transformerTime,
    })
    createTime: Date;

    @Index()
    @Column({
        comment: '更新时间',
        type: 'varchar',
        transformer: transformerTime,
    })
    updateTime: Date;


    @Column({ comment: '关联的团队ID', nullable: false, unique: true })
    teamId: number // 团队ID

}